﻿using com.guojin.core.io;
using com.guojin.core.io.message;

namespace com.guojin.mj.net.message.login
{
    //加入房间
    public class JoinRoomReq : Message
    {
        public static int TYPE = 7;
        public static int ID = 6;

        public string roomID { get; set; }

        public void decode(Input _in)
        {
        }

        public void encode(Output _out)
        {
            _out.writeString(roomID);
        }

        public int getMessageId()
        {
            return ID;
        }

        public int getMessageType()
        {
            return TYPE;
        }

        public string toString()
        {
            return "JoinRoomBtnClick [roomID=" + roomID + ", ]";
        }

        public static JoinRoomReq create(string roomID)
        {
            var joinRoomReq = new JoinRoomReq();
            joinRoomReq.roomID = roomID;
            return joinRoomReq;
        }
    }
}